<style>
#komAdvSearchTable{
	width:1000px;
	margin-top:2px;
}
#komAdvSearchTable table{
	width:100%;
	border:1px solid #aaa;
	font-size:11px;
}
#komAdvSearchTable table tr.selected{
	background:{{$highlight}};
	color:{{$highlighttext}};
}
#komAdvSearchTable table tr:hover,
#komAdvSearchTable table tr:hover a,
#komAdvSearchTable table tr.selected a{
	background:{{$highlight}};
	color:{{$highlighttext}};
}
#komAdvSearchTable table tr.head a{
	color:#FFF;
	text-decoration:none;
}
#komAdvSearchTable table tr:hover a:hover{
	background:#FF8000;
	color:#fff;
}
#komAdvSearchTable table tr td.actions a{
	display:block;
	margin-bottom:4px;
}
#komAdvSearchTable table tr td.actions a img{
	border:none;
}
#komAdvSearchTable table tr.head{
	border-bottom:3px double #777;
	background:#2577BA;
	color:#fff;
	font-weight:bolder;
	text-transform:uppercase;
}
#komAdvSearchTable table tr.head td{
	border:none;
}
#komAdvSearchTable table tr.head:hover{
	background:#2577BA;
}
#komAdvSearchTable table tr td{
	border-right:1px solid #aaa;
	border-bottom:1px solid #aaa;
}
#komAdvSearchTable input[type=button]#exportCSV{
	background-image:url(gui/icons/excel.gif);
	background-position:3px center;
	background-repeat:no-repeat;
	padding-left:16px;
	float:right;
}
#komAdvSearchTable input[type=button]#KomTask{
	background-image:url(gui/icons/komercijalista.gif);
	background-position:3px center;
	background-repeat:no-repeat;
	padding-left:18px;
	float:right;
}
</style>
<div class="area" id="komAdvSearchTable">
{{$admin_comment_start}}
	<input type="button" onclick="exportCSV(document.getElementById('advSearchTable'),'default')" value="export" id="exportCSV" />
	<input type="button" onclick="LoadRSDoc('komitenti.php?a=search&submitted=reportTM&q='+escape(document.getElementById('filter_query').value),'ypAjaxForm')" value="telemarketing" style="float:right; background-image:url(gui/icons/telemarketing.gif); background-repeat:no-repeat; background-position:2px center; padding-left:20px;" />
	<input type="button" id="KomTask" value="za komercijalu..." onclick="makeKomercijalaTask(document.getElementById('advSearchTable'))" />
{{$admin_comment_end}}
{{$manager_comment_start}}
	<input type="button" onclick="LoadRSDoc('komitenti.php?a=search&submitted=reportTM&q='+escape(document.getElementById('filter_query').value),'ypAjaxForm')" value="telemarketing" style="float:right; background-image:url(gui/icons/telemarketing.gif); background-repeat:no-repeat; background-position:2px center; padding-left:20px;" />
	<input type="button" id="KomTask" value="za komercijalu..." onclick="makeKomercijalaTask(document.getElementById('advSearchTable'))" />
{{$manager_comment_end}}
{{$telemarketing_comment_start}}
	<input type="button" onclick="LoadRSDoc('komitenti.php?a=search&submitted=reportTM&q='+escape(document.getElementById('filter_query').value),'ypAjaxForm')" value="telemarketing" style="float:right; background-image:url(gui/icons/telemarketing.gif); background-repeat:no-repeat; background-position:2px center; padding-left:20px;" />
{{$telemarketing_comment_end}}
<h3>{{$search_term}}</h3>
<input type="hidden" name="filter_query" id="filter_query" value="{{$filter_query}}" />
<ul class="letter_filter">
	{{%loop start page}}
	<li><a href="javascript:void(0)" onclick="var forma=document.getElementById('advKomitentSearchAdresa'); forma.elements['page'].value=this.innerHTML; advanceKomitentSearch(forma);" {{$current_page}}>{{$page}}</a></li>
	{{%loop end}}
</ul>
<br clear="all" />
<table cellspacing="2" cellpadding="5" id="advSearchTable">
	<tr class="head">
		<td class="info">{{$info}}</td>
		<td>šifra</td>
		<td>naziv</td>
		<td>adresa</td>
		<td>telefon</td>
		<td>fax</td>
		<td>direktor</td>
		<td>email</td>
		<td>Ž.R.</td>
		<td>delatnosti</td>
		<td><a href="javascript:void(0)" onclick="var c=this.getAttribute('all'); var tr=this.parentNode.parentNode.parentNode.getElementsByTagName('tr'); for(var i=1; i<tr.length; i++){if(c>0){tr[i].className=''; this.setAttribute('all',0);}else{tr[i].className='selected'; this.setAttribute('all',1);}}">sve</a></td>
	</tr>
	{{%loop start id}}
	<tr valign="top" onclick="this.className=(this.className=='selected')?'':'selected'">
		<td>{{$num}}</td>
		<td>{{$id}}</td>
		<td>{{$name}}</td>
		<td>{{$adresa}}</td>
		<td>{{$tel}}</td>
		<td>{{$fax}}</td>
		<td>{{$direktor}}</td>
		<td>{{$email}}</td>
		<td>{{$ziro}}</td>
		<td>{{$del}}</td>
		<td class="actions">
			<a title="detalji komitenta..." href="javascript:void(0)" onclick="blankTarget('LoadRSDoc(\'komitenti.php?a=displayOne&id={{$id}}\',\'setContent\')')"><img src="gui/icons/komitent.gif" /></a>
			<a title="telemarketing..." href="javascript:void(0)" onclick="blankTarget('LoadRSDoc(\'rokovnik.php?ef=setRokovnikKomitent&efid={{$id}}&efname={{$name_url}}\',\'setContent\')')"><img src="gui/icons/telemarketing.gif" /></a>
		</td>
	</tr>
	{{%loop end}}
</table>
</div>